package com.lxhotel.agentmcp.config;

import com.lxhotel.agentmcp.tool.HotelBookTool;
import com.lxhotel.agentmcp.tool.HotelInventoryTool;
import com.lxhotel.agentmcp.tool.HotelTool;
import com.lxhotel.agentmcp.tool.UserTool;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ProviderRegister {
    @Bean
    public ToolCallbackProvider userTools(UserTool userTool) {
        return MethodToolCallbackProvider.builder().toolObjects(userTool).build();
    }


    @Bean
    public ToolCallbackProvider hotelTools(HotelTool hotelTool) {
        return MethodToolCallbackProvider.builder().toolObjects(hotelTool).build();
    }

    @Bean
    public ToolCallbackProvider hotelInventoryTools(HotelInventoryTool hotelInventoryTool) {
        return MethodToolCallbackProvider.builder().toolObjects(hotelInventoryTool).build();
    }

    @Bean
    public ToolCallbackProvider hotelBookTools(HotelBookTool hotelBookTool) {
        return MethodToolCallbackProvider.builder().toolObjects(hotelBookTool).build();
    }
}
